<template>
  <div class="admin-login-container">
    <!-- 背景装饰元素 -->
    <div class="background-decoration">
      <!-- 以房子为结构的炫酷动态背景 -->
      <div class="house-structure-background">
        <!-- 主体建筑结构 -->
        <div class="main-building">
          <!-- 建筑物主体 -->
          <div class="building-body"></div>

          <!-- 窗户网格 -->
          <div class="window-grid">
            <div class="window-row" v-for="row in 6" :key="row">
              <div class="window" v-for="col in 5" :key="col" :class="`window-${row}-${col}`"></div>
            </div>
          </div>

          <!-- 建筑顶部装饰 -->
          <div class="building-top"></div>

          <!-- 建筑底部基座 -->
          <div class="building-base"></div>
        </div>

        <!-- 周围建筑 -->
        <div class="surrounding-building building-left"></div>
        <div class="surrounding-building building-right"></div>

        <!-- 科技光环 -->
        <div class="tech-halo halo-1"></div>
        <div class="tech-halo halo-2"></div>
        <div class="tech-halo halo-3"></div>

        <!-- 数据流 -->
        <div class="data-stream stream-1"></div>
        <div class="data-stream stream-2"></div>
        <div class="data-stream stream-3"></div>
        <div class="data-stream stream-4"></div>

        <!-- 科技粒子 -->
        <div class="tech-particle particle-1"></div>
        <div class="tech-particle particle-2"></div>
        <div class="tech-particle particle-3"></div>
        <div class="tech-particle particle-4"></div>
        <div class="tech-particle particle-5"></div>
        <div class="tech-particle particle-6"></div>
        <div class="tech-particle particle-7"></div>
        <div class="tech-particle particle-8"></div>
        <div class="tech-particle particle-9"></div>
        <div class="tech-particle particle-10"></div>

        <!-- 电路节点 -->
        <div class="circuit-node node-1"></div>
        <div class="circuit-node node-2"></div>
        <div class="circuit-node node-3"></div>
        <div class="circuit-node node-4"></div>
        <div class="circuit-node node-5"></div>

        <!-- 光效 -->
        <div class="light-beam beam-1"></div>
        <div class="light-beam beam-2"></div>
        <div class="light-beam beam-3"></div>

        <!-- 扫描线 -->
        <div class="scan-line"></div>
      </div>

      <!-- 浮动装饰元素 -->
      <div class="floating-shape shape-1"></div>
      <div class="floating-shape shape-2"></div>
      <div class="floating-shape shape-3"></div>
    </div>

    <div class="admin-login-wrapper">
      <!-- 左侧装饰面板 -->
      <div class="decorative-panel">
        <div class="panel-content">
          <div class="logo-section">
            <div class="main-logo">
              <svg viewBox="0 0 100 100" class="logo-svg">
                <rect x="20" y="30" width="60" height="50" rx="5" fill="none" stroke="#00c3ff" stroke-width="3"/>
                <rect x="30" y="40" width="15" height="15" fill="none" stroke="#00c3ff" stroke-width="2"/>
                <rect x="55" y="40" width="15" height="15" fill="none" stroke="#00c3ff" stroke-width="2"/>
                <rect x="30" y="60" width="40" height="10" fill="none" stroke="#00c3ff" stroke-width="2"/>
                <circle cx="75" cy="25" r="5" fill="#00c3ff"/>
              </svg>
            </div>
            <h1 class="app-title">HousingHub</h1>
            <p class="app-subtitle">管理系统</p>
          </div>

          <div class="features-section">
            <div class="feature-item">
              <div class="feature-icon">
                <!-- 系统管理图标 -->
                <svg class="feature-svg" viewBox="0 0 24 24">
                  <path d="M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z"/>
                </svg>
              </div>
              <div class="feature-text">
                <h3>系统管理</h3>
                <p>全面的后台管理系统，轻松掌控平台运营</p>
              </div>
            </div>

            <div class="feature-item">
              <div class="feature-icon">
                <!-- 数据分析图标 -->
                <svg class="feature-svg" viewBox="0 0 24 24">
                  <path d="M3 3v18h18v-2H5V3H3zm4 14h2V9H7v8zm4 0h2V5h-2v12zm4 0h2v-6h-2v6z"/>
                </svg>
              </div>
              <div class="feature-text">
                <h3>数据分析</h3>
                <p>实时数据监控与分析，辅助决策制定</p>
              </div>
            </div>

            <div class="feature-item">
              <div class="feature-icon">
                <!-- 安全保障图标 -->
                <svg class="feature-svg" viewBox="0 0 24 24">
                  <path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/>
                </svg>
              </div>
              <div class="feature-text">
                <h3>安全保障</h3>
                <p>多重安全防护机制，确保系统稳定运行</p>
              </div>
            </div>
          </div>

          <div class="quote-section">
            <p class="quote-text">"专业管理，高效运营"</p>
            <p class="quote-author">—— HousingHub 管理团队</p>
          </div>
        </div>
      </div>

      <!-- 管理员登录表单区域 -->
      <div class="admin-login-box">
        <div class="form-header">
          <h2>管理员登录</h2>
          <p>请输入管理员账户信息</p>
        </div>

        <el-form
            ref="adminFormRef"
            :model="adminForm"
            :rules="adminRules"
            class="admin-form"
            label-position="left"
            label-width="0px"
        >
          <el-form-item prop="adminUsername">
            <el-input
                v-model="adminForm.adminUsername"
                prefix-icon="el-icon-user"
                placeholder="管理员账号"
                class="custom-input"
            />
          </el-form-item>

          <el-form-item prop="adminPassword">
            <el-input
                v-model="adminForm.adminPassword"
                prefix-icon="el-icon-lock"
                :type="showPassword ? 'text' : 'password'"
                placeholder="管理员密码"
                class="custom-input"
                show-password
            />
          </el-form-item>

          <el-form-item>
            <el-button
                type="primary"
                :loading="adminLoading"
                @click="handleAdminLogin"
                class="admin-login-btn custom-button"
            >
              登录
            </el-button>
          </el-form-item>
        </el-form>

        <div class="back-to-user-login">
          <el-link type="info" @click="goToUserLogin">返回用户登录</el-link>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref, reactive } from 'vue'
import { ElMessage } from 'element-plus'
import { useRouter } from 'vue-router'
import { adminLogin } from '@/utils/apiService'
import { saveAdminToken, saveAdminInfo } from '@/utils/auth'
import tokenMonitor from '@/utils/tokenMonitor'

const router = useRouter()

// 表单引用
const adminFormRef = ref(null)

// 密码显示状态
const showPassword = ref(false)

// 表单数据
const adminForm = reactive({
  adminUsername: 'root02',
  adminPassword: '123suyu'
})

// 表单验证规则
const adminRules = reactive({
  adminUsername: [
    { required: true, message: '请输入管理员账号', trigger: 'blur' },
    { min: 3, max: 20, message: '管理员账号长度在3-20个字符', trigger: 'blur' }
  ],
  adminPassword: [
    { required: true, message: '请输入管理员密码', trigger: 'blur' },
    { min: 6, max: 20, message: '管理员密码长度在6-20个字符', trigger: 'blur' }
  ]
})

// 状态
const adminLoading = ref(false)

// 跳转到用户登录页面
const goToUserLogin = () => {
  router.push('/login')
}

// 处理管理员登录
const handleAdminLogin = async () => {
  if (!adminFormRef.value) return

  try {
    const valid = await adminFormRef.value.validate()
    if (!valid) {
      ElMessage.warning('请检查并完善登录信息')
      return
    }

    adminLoading.value = true

    // 调用管理员登录API
    const response = await adminLogin({
      username: adminForm.adminUsername,
      password: adminForm.adminPassword
    })

    console.log('🔍 前端收到的完整响应:', response)
    console.log('🔍 响应状态:', response.status)
    console.log('🔍 响应数据:', response.data)
    console.log('🔍 响应码类型:', typeof response.data.code, '值:', response.data.code)

    if (response.data.code === "200" || response.data.code === 200) {
      // 保存token和管理员信息 (后端返回格式: {data: {info: token, loginAdmin: admin}})
      console.log('🔍 登录成功，开始保存token和管理员信息')
      console.log('🔍 response.data.data.info:', response.data.data.info)
      console.log('🔍 response.data.data.loginAdmin:', response.data.data.loginAdmin)

      // 保持用户登录状态，支持管理员和用户双重身份
      const hasUserLogin = localStorage.getItem('userToken') && localStorage.getItem('isLoggedIn') === 'true'
      if (hasUserLogin) {
        console.log('🔍 检测到用户已登录，保持用户登录状态，支持双重身份')
      } else {
        console.log('🔍 用户未登录，仅设置管理员登录状态')
      }

      if (response.data.data.info) {
        saveAdminToken(response.data.data.info)
        console.log('✅ 管理员token已保存')
      } else {
        console.log('❌ 没有找到管理员token (response.data.data.info)')
      }

      if (response.data.data.loginAdmin) {
        saveAdminInfo(response.data.data.loginAdmin)
        console.log('✅ 管理员信息已保存')
      } else {
        console.log('❌ 没有找到管理员信息 (response.data.data.loginAdmin)')
      }

      // 检查登录状态
      const { checkLoginStatus } = await import('@/utils/auth')
      checkLoginStatus()

      ElMessage.success('登录成功')

      // 延迟一下再跳转，确保localStorage已更新
      setTimeout(() => {
        console.log('🔍 准备跳转到管理员仪表盘')
        router.push('/admin/dashboard')

        // 延迟启动token监控，确保token已完全保存到后端
        setTimeout(() => {
          console.log('🔍 启动token监控')
          tokenMonitor.startMonitoring()
        }, 2000) // 延迟2秒启动监控
      }, 100)
    } else {
      console.log('❌ 登录失败 - 响应码:', response.data.code)
      console.log('❌ 登录失败 - 响应消息:', response.data.message)
      console.log('❌ 登录失败 - 完整响应数据:', response)
      ElMessage.error(response.data.message || '登录失败')
    }
  } catch (error) {
    console.error('管理员登录错误:', error)
    ElMessage.error('登录失败，请检查网络连接或联系系统管理员')
  } finally {
    adminLoading.value = false
  }
}

</script>

<style scoped>
.admin-login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  padding: 20px;
  background: linear-gradient(135deg, #0c1a25, #1a364d, #2c5364);
}

.background-decoration {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

/* 以房子为结构的炫酷动态背景 */
.house-structure-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, #0c1a25, #1a364d);
  overflow: hidden;
}

/* 主体建筑 */
.main-building {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 400px;
  animation: buildingGlow 4s infinite alternate;
}

.building-body {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 350px;
  background: linear-gradient(to top, rgba(0, 50, 100, 0.7), rgba(0, 100, 150, 0.5));
  border-radius: 5px 5px 0 0;
  box-shadow: 0 0 30px rgba(0, 150, 255, 0.3);
}

/* 窗户网格 */
.window-grid {
  position: absolute;
  bottom: 50px;
  left: 20px;
  width: calc(100% - 40px);
  height: 280px;
}

.window-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.window {
  width: 30px;
  height: 40px;
  background: rgba(0, 195, 255, 0.2);
  border-radius: 3px;
  animation: windowGlow 3s infinite alternate;
}

/* 为不同的窗户设置不同的动画延迟 */
.window-1-1 { animation-delay: 0s; }
.window-1-2 { animation-delay: 0.5s; }
.window-1-3 { animation-delay: 1s; }
.window-1-4 { animation-delay: 1.5s; }
.window-1-5 { animation-delay: 2s; }

.window-2-1 { animation-delay: 0.3s; }
.window-2-2 { animation-delay: 0.8s; }
.window-2-3 { animation-delay: 1.3s; }
.window-2-4 { animation-delay: 1.8s; }
.window-2-5 { animation-delay: 2.3s; }

.window-3-1 { animation-delay: 0.6s; }
.window-3-2 { animation-delay: 1.1s; }
.window-3-3 { animation-delay: 1.6s; }
.window-3-4 { animation-delay: 2.1s; }
.window-3-5 { animation-delay: 2.6s; }

.window-4-1 { animation-delay: 0.9s; }
.window-4-2 { animation-delay: 1.4s; }
.window-4-3 { animation-delay: 1.9s; }
.window-4-4 { animation-delay: 2.4s; }
.window-4-5 { animation-delay: 2.9s; }

.window-5-1 { animation-delay: 1.2s; }
.window-5-2 { animation-delay: 1.7s; }
.window-5-3 { animation-delay: 2.2s; }
.window-5-4 { animation-delay: 2.7s; }
.window-5-5 { animation-delay: 3.2s; }

.window-6-1 { animation-delay: 1.5s; }
.window-6-2 { animation-delay: 2s; }
.window-6-3 { animation-delay: 2.5s; }
.window-6-4 { animation-delay: 3s; }
.window-6-5 { animation-delay: 3.5s; }

.building-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 30px;
  background: rgba(0, 100, 200, 0.8);
  border-radius: 5px 5px 0 0;
  animation: topGlow 3s infinite alternate;
}

.building-base {
  position: absolute;
  bottom: 0;
  left: -20px;
  width: calc(100% + 40px);
  height: 30px;
  background: rgba(0, 80, 160, 0.9);
  border-radius: 5px;
  animation: baseGlow 4s infinite alternate;
}

/* 周围建筑 */
.surrounding-building {
  position: absolute;
  bottom: 0;
  width: 150px;
  height: 300px;
  background: linear-gradient(to top, rgba(0, 40, 80, 0.6), rgba(0, 80, 160, 0.4));
  border-radius: 5px 5px 0 0;
  animation: surroundingGlow 5s infinite alternate;
}

.building-left {
  left: 20%;
}

.building-right {
  right: 20%;
}

/* 科技光环 */
.tech-halo {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(0, 195, 255, 0.3);
  animation: haloPulse 5s infinite alternate;
}

.halo-1 {
  top: 20%;
  left: 30%;
  width: 80px;
  height: 80px;
  animation-delay: 0s;
}

.halo-2 {
  top: 40%;
  right: 25%;
  width: 120px;
  height: 120px;
  animation-delay: 1.5s;
}

.halo-3 {
  bottom: 30%;
  left: 40%;
  width: 60px;
  height: 60px;
  animation-delay: 3s;
}

/* 数据流 */
.data-stream {
  position: absolute;
  height: 3px;
  background: linear-gradient(to right, transparent, rgba(0, 195, 255, 0.8), transparent);
  animation: dataFlow 4s infinite linear;
}

.stream-1 {
  top: 20%;
  left: -100px;
  width: 200px;
  animation-delay: 0s;
}

.stream-2 {
  top: 35%;
  right: -150px;
  width: 300px;
  animation-delay: 1s;
  animation-direction: reverse;
}

.stream-3 {
  top: 60%;
  left: -200px;
  width: 250px;
  animation-delay: 2s;
}

.stream-4 {
  bottom: 20%;
  right: -100px;
  width: 180px;
  animation-delay: 3s;
  animation-direction: reverse;
}

/* 科技粒子 */
.tech-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 195, 255, 0.8);
  box-shadow: 0 0 10px rgba(0, 195, 255, 1);
  animation: particleMove 6s infinite linear;
}

.particle-1 {
  top: 10%;
  left: 15%;
  animation-delay: 0s;
}

.particle-2 {
  top: 25%;
  left: 75%;
  animation-delay: 1s;
}

.particle-3 {
  top: 40%;
  left: 30%;
  animation-delay: 2s;
}

.particle-4 {
  top: 55%;
  left: 85%;
  animation-delay: 3s;
}

.particle-5 {
  top: 70%;
  left: 20%;
  animation-delay: 4s;
}

.particle-6 {
  top: 85%;
  left: 65%;
  animation-delay: 5s;
}

.particle-7 {
  top: 20%;
  left: 50%;
  animation-delay: 6s;
}

.particle-8 {
  top: 35%;
  left: 10%;
  animation-delay: 7s;
}

.particle-9 {
  top: 65%;
  left: 70%;
  animation-delay: 8s;
}

.particle-10 {
  top: 80%;
  left: 40%;
  animation-delay: 9s;
}

/* 电路节点 */
.circuit-node {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(0, 195, 255, 0.9);
  box-shadow: 0 0 15px rgba(0, 195, 255, 1);
  animation: nodePulse 2s infinite alternate;
}

.node-1 {
  top: 15%;
  left: 25%;
  animation-delay: 0s;
}

.node-2 {
  top: 30%;
  right: 30%;
  animation-delay: 0.5s;
}

.node-3 {
  top: 50%;
  left: 20%;
  animation-delay: 1s;
}

.node-4 {
  bottom: 40%;
  right: 25%;
  animation-delay: 1.5s;
}

.node-5 {
  bottom: 25%;
  left: 40%;
  animation-delay: 2s;
}

/* 光效 */
.light-beam {
  position: absolute;
  width: 3px;
  height: 200px;
  background: linear-gradient(to bottom, transparent, rgba(0, 195, 255, 0.6), transparent);
  animation: lightBeam 5s infinite linear;
}

.beam-1 {
  top: 0;
  left: 30%;
  animation-delay: 0s;
}

.beam-2 {
  top: 0;
  left: 50%;
  animation-delay: 1.5s;
}

.beam-3 {
  top: 0;
  left: 70%;
  animation-delay: 3s;
}

/* 扫描线 */
.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, transparent, rgba(0, 195, 255, 0.8), transparent);
  animation: scanMove 6s infinite linear;
}

/* 动画定义 */
@keyframes buildingGlow {
  0% {
    box-shadow: 0 0 30px rgba(0, 150, 255, 0.3);
  }
  100% {
    box-shadow: 0 0 50px rgba(0, 195, 255, 0.6);
  }
}

@keyframes windowGlow {
  0% {
    background: rgba(0, 195, 255, 0.2);
    box-shadow: 0 0 5px rgba(0, 195, 255, 0.3);
  }
  100% {
    background: rgba(0, 195, 255, 0.6);
    box-shadow: 0 0 15px rgba(0, 195, 255, 0.8);
  }
}

@keyframes topGlow {
  0% {
    background: rgba(0, 100, 200, 0.8);
    box-shadow: 0 0 10px rgba(0, 150, 255, 0.4);
  }
  100% {
    background: rgba(0, 150, 255, 0.9);
    box-shadow: 0 0 20px rgba(0, 195, 255, 0.7);
  }
}

@keyframes baseGlow {
  0% {
    background: rgba(0, 80, 160, 0.9);
    box-shadow: 0 0 15px rgba(0, 150, 255, 0.4);
  }
  100% {
    background: rgba(0, 120, 220, 0.9);
    box-shadow: 0 0 25px rgba(0, 195, 255, 0.7);
  }
}

@keyframes surroundingGlow {
  0% {
    box-shadow: 0 0 20px rgba(0, 150, 255, 0.3);
  }
  100% {
    box-shadow: 0 0 40px rgba(0, 195, 255, 0.6);
  }
}

@keyframes haloPulse {
  0% {
    transform: scale(1);
    border-color: rgba(0, 195, 255, 0.3);
  }
  100% {
    transform: scale(1.5);
    border-color: rgba(0, 195, 255, 0.7);
  }
}

@keyframes dataFlow {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(100vw + 200px));
  }
}

@keyframes particleMove {
  0% {
    transform: translate(0, 0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translate(100px, -100px);
    opacity: 0;
  }
}

@keyframes nodePulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 15px rgba(0, 195, 255, 1);
  }
  100% {
    transform: scale(1.5);
    box-shadow: 0 0 25px rgba(0, 195, 255, 1);
  }
}

@keyframes lightBeam {
  0% {
    transform: translateY(-100px);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

@keyframes scanMove {
  0% {
    top: 0;
  }
  100% {
    top: 100%;
  }
}

/* 浮动装饰元素 */
.floating-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 195, 255, 0.1);
  animation: float 20s infinite linear;
}

.shape-1 {
  width: 300px;
  height: 300px;
  top: -100px;
  left: -100px;
  animation-duration: 25s;
  background: radial-gradient(circle, rgba(0, 195, 255, 0.2) 0%, transparent 70%);
}

.shape-2 {
  width: 200px;
  height: 200px;
  bottom: -80px;
  right: -80px;
  animation-duration: 30s;
  animation-direction: reverse;
  background: radial-gradient(circle, rgba(0, 195, 255, 0.2) 0%, transparent 70%);
}

.shape-3 {
  width: 150px;
  height: 150px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 35s;
  background: radial-gradient(circle, rgba(0, 195, 255, 0.2) 0%, transparent 70%);
}

@keyframes float {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(20px, 20px) rotate(90deg);
  }
  50% {
    transform: translate(0, 40px) rotate(180deg);
  }
  75% {
    transform: translate(-20px, 20px) rotate(270deg);
  }
  100% {
    transform: translate(0, 0) rotate(360deg);
  }
}

.admin-login-wrapper {
  display: flex;
  width: 900px;
  height: 550px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  z-index: 1;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.decorative-panel {
  flex: 1;
  background: linear-gradient(135deg, rgba(0, 150, 200, 0.85) 0%, rgba(0, 195, 255, 0.85) 100%);
  color: white;
  padding: 40px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.decorative-panel::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  animation: shine 5s infinite;
}

@keyframes shine {
  0% {
    transform: rotate(45deg) translateX(-100%);
  }
  100% {
    transform: rotate(45deg) translateX(100%);
  }
}

.panel-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.logo-section {
  text-align: center;
  margin-bottom: 40px;
}

.main-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.logo-svg {
  width: 100%;
  height: 100%;
}

.app-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.app-subtitle {
  font-size: 18px;
  opacity: 0.9;
  margin: 0;
}

.features-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.feature-item {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.feature-icon {
  font-size: 24px;
  background: rgba(255, 255, 255, 0.2);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: iconFloat 3s infinite ease-in-out;
}

@keyframes iconFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* 功能图标样式 */
.feature-svg {
  width: 24px;
  height: 24px;
  fill: white;
}

.feature-text h3 {
  margin: 0 0 5px;
  font-size: 18px;
  font-weight: 600;
  text-align: left;
}

.feature-text p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
  text-align: left;
}

.quote-section {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.quote-text {
  font-style: italic;
  margin: 0 0 10px;
  font-size: 16px;
}

.quote-author {
  margin: 0;
  font-size: 14px;
  opacity: 0.8;
}

.admin-login-box {
  width: 380px;
  background: rgba(12, 26, 37, 0.95);
  backdrop-filter: blur(10px);
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.form-header {
  text-align: center;
  margin-bottom: 30px;
}

.form-header h2 {
  color: #00c3ff;
  font-size: 28px;
  margin: 0 0 10px;
  font-weight: 700;
}

.form-header p {
  color: #a0d2eb;
  margin: 0;
  font-size: 16px;
}

.admin-form {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.custom-input :deep(.el-input__inner) {
  padding: 15px;
  border-radius: 10px;
  border: none;
  background: rgba(20, 40, 60, 0.8);
  transition: all 0.3s ease;
  font-size: 14px;
  color: #00c3ff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.custom-input :deep(.el-input__inner):focus {
  outline: none;
  box-shadow: 0 2px 8px rgba(0, 195, 255, 0.5);
}

.custom-input :deep(.el-input__inner)::placeholder {
  color: #5d7d9a;
}

.custom-button {
  padding: 15px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  width: 100%;
  margin-bottom: 15px;
}

.admin-login-btn {
  background: linear-gradient(135deg, #00c3ff 0%, #0066cc 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 195, 255, 0.3);
}

.admin-login-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 20px rgba(0, 195, 255, 0.5);
}

.back-to-user-login {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
}

.back-to-user-login a {
  cursor: pointer;
  color: #a0d2eb;
}

:deep(.el-form-item) {
  margin-bottom: 20px;
}

:deep(.el-form-item__error) {
  padding-top: 2px;
  color: #ff6b6b;
}

@media (max-width: 992px) {
  .admin-login-wrapper {
    width: 95%;
    max-width: 500px;
    height: auto;
  }

  .decorative-panel {
    display: none;
  }

  .admin-login-box {
    width: 100%;
  }
}
</style>
